<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="月报," />










<meta name="description" content="会议相关月报样板您xx月共参加了xx ×x小时的会议，与xx个人进行过会晤，最近较为关注的公司有xx,xx,xx(公司名)(数据取自日程，会晤人取日程参与人，关注公司取参与会议的人次较多的前三名公司；会议仅包括：橙子日程中从橙脉和手机日历获取的日程） 参加会议时间oradt_cloud1520.contact_card_schedule 取会议开始结束时间；12345678910111213141">
<meta name="keywords" content="月报">
<meta property="og:type" content="article">
<meta property="og:title" content="月报会议模块">
<meta property="og:url" content="http://yoursite.com/2017/03/02/meeting/index.html">
<meta property="og:site_name" content="Frone&#39;s Blog">
<meta property="og:description" content="会议相关月报样板您xx月共参加了xx ×x小时的会议，与xx个人进行过会晤，最近较为关注的公司有xx,xx,xx(公司名)(数据取自日程，会晤人取日程参与人，关注公司取参与会议的人次较多的前三名公司；会议仅包括：橙子日程中从橙脉和手机日历获取的日程） 参加会议时间oradt_cloud1520.contact_card_schedule 取会议开始结束时间；12345678910111213141">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-07-13T11:06:08.776Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="月报会议模块">
<meta name="twitter:description" content="会议相关月报样板您xx月共参加了xx ×x小时的会议，与xx个人进行过会晤，最近较为关注的公司有xx,xx,xx(公司名)(数据取自日程，会晤人取日程参与人，关注公司取参与会议的人次较多的前三名公司；会议仅包括：橙子日程中从橙脉和手机日历获取的日程） 参加会议时间oradt_cloud1520.contact_card_schedule 取会议开始结束时间；12345678910111213141">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/03/02/meeting/"/>





  <title>月报会议模块 | Frone's Blog</title><!-- hexo-inject:begin --><!-- hexo-inject:end -->
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Frone's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术小窝</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/404/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
            
            公益404
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/03/02/meeting/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Frone Xie">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Frone's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">月报会议模块</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-03-02T14:31:19+08:00">
                2017-03-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/IMORA/" itemprop="url" rel="index">
                    <span itemprop="name">IMORA</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/2017/03/02/meeting/" class="leancloud_visitors" data-flag-title="月报会议模块">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="会议相关月报样板"><a href="#会议相关月报样板" class="headerlink" title="会议相关月报样板"></a>会议相关月报样板</h3><p>您xx月共参加了xx ×x小时的会议，与xx个人进行过会晤，最近较为关注的公司有xx,xx,xx(公司名)<br>(数据取自日程，会晤人取日程参与人，关注公司取参与会议的人次较多的前三名公司；会议仅包括：橙子日程中从橙脉和手机日历获取的日程）</p>
<h3 id="参加会议时间"><a href="#参加会议时间" class="headerlink" title="参加会议时间"></a>参加会议时间</h3><p>oradt_cloud1520.contact_card_schedule 取会议开始结束时间；<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">select user_id,SUM(meeting_time) as total_schedule_hour from(</span><br><span class="line">select a.id as schedule_id,a.user_id,content,title,</span><br><span class="line">FROM_UNIXTIME(start_time) as start_time,</span><br><span class="line">FROM_UNIXTIME(end_time) as end_time,</span><br><span class="line">(end_time - start_time)/(60*60*24) as day_diff,</span><br><span class="line">case</span><br><span class="line">-- 本月开始结束且一天之内结束</span><br><span class="line">when (end_time - start_time)/(60*60*24) &lt;= 1 and MONTH(FROM_UNIXTIME(start_time)) = 3 and MONTH(FROM_UNIXTIME(end_time))=3 </span><br><span class="line">then round((end_time - start_time)/(60*60)) </span><br><span class="line">-- 本月开始结束且一天之内没有结束</span><br><span class="line">when (end_time - start_time)/(60*60*24) &gt; 1 and MONTH(FROM_UNIXTIME(start_time)) = 3 and MONTH(FROM_UNIXTIME(end_time))=3 </span><br><span class="line">then round((end_time - start_time)/(60*60*24) * 8) </span><br><span class="line">-- 结束时间不是本月，则取月初第一天为结束时间</span><br><span class="line">when (end_time - start_time)/(60*60*24) &gt; 1 and MONTH(FROM_UNIXTIME(start_time)) = 3 and MONTH(FROM_UNIXTIME(end_time))!=3 </span><br><span class="line">then round((UNIX_TIMESTAMP(last_day(curdate())) - start_time)/(60*60*24) * 8) </span><br><span class="line">-- 开始时间不是本月，则取月初第一天为开始时间 </span><br><span class="line">when (end_time - start_time)/(60*60*24) &gt; 1 </span><br><span class="line">and MONTH(FROM_UNIXTIME(start_time)) != 3 and MONTH(FROM_UNIXTIME(start_time)) != 3 and MONTH(FROM_UNIXTIME(end_time))=3 </span><br><span class="line">then round((end_time - UNIX_TIMESTAMP(DATE_ADD(curdate(),interval -day(curdate())+1 day)))/(60*60*24) * 8)</span><br><span class="line">end as meeting_time</span><br><span class="line">from oradt_cloud1520.contact_card_schedule a </span><br><span class="line">right join oradt_cloud1520.contact_card_schedule_map b on a.id = b.schedule_id</span><br><span class="line">left join(</span><br><span class="line">select user_id,uuid</span><br><span class="line">    from oradt_cloud1520.contact_card</span><br><span class="line">    where self=&apos;true&apos; and status = &apos;active&apos;</span><br><span class="line">) as c on c.user_id = a.user_id and c.uuid = b.uuid </span><br><span class="line">WHERE a.start_time &gt;0 and a.end_time &gt; a.start_time </span><br><span class="line">and b.status != 0 and b.uuid != &apos;&apos; and c.uuid is null and a.status = 1</span><br><span class="line">and YEAR(FROM_UNIXTIME(start_time)) = 2017 and YEAR(FROM_UNIXTIME(end_time))=2017</span><br><span class="line">and (MONTH(FROM_UNIXTIME(start_time)) = 3 or MONTH(FROM_UNIXTIME(end_time))=3)</span><br><span class="line">order by user_id,schedule_id</span><br><span class="line">)c GROUP BY user_id;</span><br></pre></td></tr></table></figure></p>
<h3 id="名片角色总会见人数"><a href="#名片角色总会见人数" class="headerlink" title="名片角色总会见人数"></a>名片角色总会见人数</h3><p>先统计每个人参加了几个会议（会议需要去重）<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">select user_id, GROUP_CONCAT(DISTINCT(schedule_id)) as meeting_list from(</span><br><span class="line">select a.user_id, a.id as schedule_id</span><br><span class="line">from oradt_cloud1520.contact_card_schedule a</span><br><span class="line">right join oradt_cloud1520.contact_card_schedule_map b on a.id = b.schedule_id</span><br><span class="line">left join(</span><br><span class="line">select user_id,uuid</span><br><span class="line">    from oradt_cloud1520.contact_card</span><br><span class="line">    where self=&apos;true&apos; and status = &apos;active&apos;</span><br><span class="line">) as c on c.user_id = a.user_id and c.uuid = b.uuid  </span><br><span class="line">WHERE a.start_time &gt;0 and a.end_time &gt; a.start_time </span><br><span class="line">and b.status != 0 and b.uuid != &apos;&apos; and c.uuid is null and a.status = 1</span><br><span class="line">and YEAR(FROM_UNIXTIME(start_time)) = 2017 and YEAR(FROM_UNIXTIME(end_time))=2017</span><br><span class="line">and (MONTH(FROM_UNIXTIME(start_time)) = 3 or MONTH(FROM_UNIXTIME(end_time))= 3)</span><br><span class="line">order by schedule_id,user_id</span><br><span class="line">) a GROUP BY user_id;</span><br></pre></td></tr></table></figure></p>
<p>然后分别统计每个人的会议时长<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">select DISTINCT(count(uuid)) from oradt_cloud1520.contact_card_schedule_map where status != 0 and uuid != &apos;&apos; and</span><br><span class="line">schedule_id in (3260,3890,3895,3915,4249,4252,4254,4255,4280,4822);</span><br></pre></td></tr></table></figure></p>
<h3 id="关注公司"><a href="#关注公司" class="headerlink" title="关注公司"></a>关注公司</h3><p>oradt_cloud1520.contact_card_schedule_map 取uuid，即参与人；<br>与DM库中公司表关联得到参与人公司,统计公司前三位<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">select user_id, GROUP_CONCAT(companyName ORDER BY com_count desc,last_modified desc) as com_list from(</span><br><span class="line">select user_id,companyName,count(*) as com_count,max(last_modified) as last_modified from(</span><br><span class="line">select d.*,FROM_UNIXTIME(g.last_modified) as last_modified from(</span><br><span class="line">select a.user_id,b.schedule_id,b.uuid,c.companyName</span><br><span class="line">from oradt_cloud1520.contact_card_schedule a </span><br><span class="line">right join oradt_cloud1520.contact_card_schedule_map b on a.id = b.schedule_id</span><br><span class="line">left JOIN(select DISTINCT user_id,card_id,companyName from dm_test.company_info_jsonver) as c on b.uuid = c.card_id</span><br><span class="line">left join(</span><br><span class="line">select user_id,uuid</span><br><span class="line">    from oradt_cloud1520.contact_card</span><br><span class="line">    where self=&apos;true&apos; and status = &apos;active&apos;</span><br><span class="line">) as f on f.user_id = a.user_id and f.uuid = b.uuid</span><br><span class="line">WHERE a.start_time &gt; 0 and a.end_time &gt; a.start_time </span><br><span class="line">and b.status != 0 and b.uuid != &apos;&apos; and f.uuid is null and a.status = 1</span><br><span class="line">and YEAR(FROM_UNIXTIME(start_time)) = 2017 and YEAR(FROM_UNIXTIME(end_time))=2017</span><br><span class="line">and (MONTH(FROM_UNIXTIME(start_time)) = 3 or MONTH(FROM_UNIXTIME(end_time))= 3)</span><br><span class="line">and c.companyName !=&apos;&apos; and c.companyName is NOT null</span><br><span class="line">)d left join oradt_cloud1520.contact_card g on g.uuid = d.uuid) h</span><br><span class="line">GROUP BY user_id,companyName ORDER BY com_count desc,last_modified desc</span><br><span class="line">)e GROUP BY user_id;</span><br></pre></td></tr></table></figure></p>
<h3 id="相关表结构"><a href="#相关表结构" class="headerlink" title="相关表结构"></a>相关表结构</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line">CREATE TABLE `contact_card_schedule` (</span><br><span class="line">  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT &apos;主键&apos;,</span><br><span class="line">  `user_id` char(40) CHARACTER SET utf8 NOT NULL DEFAULT &apos;&apos; COMMENT &apos;创建人user_id&apos;,</span><br><span class="line">  `vcard_id` char(32) CHARACTER SET utf8 DEFAULT &apos;&apos; COMMENT &apos;日程名片id&apos;,</span><br><span class="line">  `content` text NOT NULL COMMENT &apos;日程内容&apos;,</span><br><span class="line">  `title` varchar(100) DEFAULT &apos;&apos; COMMENT &apos;日程标题&apos;,</span><br><span class="line">  `address` varchar(300) DEFAULT &apos;&apos; COMMENT &apos;地址&apos;,</span><br><span class="line">  `start_time` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;日程开始时间&apos;,</span><br><span class="line">  `end_time` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;日程结束时间&apos;,</span><br><span class="line">  `remind_time` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;提醒时间&apos;,</span><br><span class="line">  `cycle` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;提醒周期（例：15分钟为900单位为秒）&apos;,</span><br><span class="line">  `isallday` tinyint(1) NOT NULL DEFAULT &apos;2&apos; COMMENT &apos;是否全天 ：1是  2否 &apos;,</span><br><span class="line">  `flag_time` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;提醒计算字段（为时间戳）&apos;,</span><br><span class="line">  `last_modify` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;最后修改时间&apos;,</span><br><span class="line">  `create_time` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;创建时间&apos;,</span><br><span class="line">  `latitude` decimal(13,8) NOT NULL DEFAULT &apos;0.00000000&apos; COMMENT &apos;坐标&apos;,</span><br><span class="line">  `longitude` decimal(13,8) NOT NULL DEFAULT &apos;0.00000000&apos; COMMENT &apos;坐标&apos;,</span><br><span class="line">  `is_remind` tinyint(1) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;是否提醒&apos;,</span><br><span class="line">  `status` tinyint(1) NOT NULL DEFAULT &apos;1&apos; COMMENT &apos;1为添加2为删除&apos;,</span><br><span class="line">  `flight_id` int(20) DEFAULT &apos;0&apos; COMMENT &apos;行程卡id&apos;,</span><br><span class="line">  `schedule_from` tinyint(2) NOT NULL DEFAULT &apos;1&apos; COMMENT &apos;日程来源：1.为橙脉2.为手机同步3.短信同步为4.为行程卡5.为还款同步6.航旅卡&apos;,</span><br><span class="line">  `schedule_info` text CHARACTER SET utf8 COMMENT &apos;来源模块信息&apos;,</span><br><span class="line">  `orange_remind` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;橙子专用提醒时间&apos;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  KEY `user_id` (`user_id`),</span><br><span class="line">  KEY `v_cardid_idx` (`vcard_id`) USING BTREE</span><br><span class="line">) ENGINE=InnoDB AUTO_INCREMENT=4771 DEFAULT CHARSET=utf8mb4</span><br><span class="line"></span><br><span class="line">CREATE TABLE `contact_card_schedule_map` (</span><br><span class="line">  `id` int(20) unsigned NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `uuid` char(32) NOT NULL DEFAULT &apos;&apos; COMMENT &apos;邀请人cardid&apos;,</span><br><span class="line">  `schedule_id` bigint(20) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;日程id&apos;,</span><br><span class="line">  `last_modify` int(10) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;最后更新时间&apos;,</span><br><span class="line">  `operation` enum(&apos;delete&apos;,&apos;modify&apos;,&apos;add&apos;) NOT NULL COMMENT &apos;参与人状态&apos;,</span><br><span class="line">  `status` tinyint(1) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;0 不参与 1 未接受 2 已接受 3 完成&apos;,</span><br><span class="line">  PRIMARY KEY (`id`),</span><br><span class="line">  KEY `sch_id` (`schedule_id`) USING BTREE,</span><br><span class="line">  KEY `v_uuid_index` (`uuid`) USING BTREE</span><br><span class="line">) ENGINE=InnoDB AUTO_INCREMENT=7093 DEFAULT CHARSET=utf8mb4</span><br><span class="line"></span><br><span class="line">CREATE TABLE `orange_meeting_follow` (</span><br><span class="line">  `id` int(10) NOT NULL AUTO_INCREMENT,</span><br><span class="line">  `user_id` varchar(42) NOT NULL COMMENT &apos;用户id&apos;,</span><br><span class="line">  `meeting_hour` int(2) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;会议小时数&apos;,</span><br><span class="line">  `meeting_people` int(2) NOT NULL DEFAULT &apos;0&apos; COMMENT &apos;面谈人数&apos;,</span><br><span class="line">  `follow_comp` text COMMENT &apos;关注公司列表&apos;,</span><br><span class="line">  `report_month` int(6) NOT NULL COMMENT &apos;月报生成年月,存储格式例：201702&apos;,</span><br><span class="line">  PRIMARY KEY (`id`)</span><br><span class="line">) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT=&apos;用户会议相关及关注公司统计表&apos;</span><br></pre></td></tr></table></figure>

      
    </div>
    
    
    

    
      <div>
        <div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
    <img id="wechat_subscriber_qcode" src="/uploads/wechat-qcode.jpg" alt="Frone Xie wechat" style="width: 200px; max-width: 100%;"/>
    <div>欢迎关注我的微信公众号！</div>
</div>

      </div>
    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/月报/" rel="tag"># 月报</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div id="needsharebutton-postbottom">
            <span class="btn">
              <i class="fa fa-share-alt" aria-hidden="true"></i>
            </span>
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/02/15/monthlyReport/" rel="next" title="月报各统计指标计算方法">
                <i class="fa fa-chevron-left"></i> 月报各统计指标计算方法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/04/28/namecard_extra/" rel="prev" title="名片信息拓展系统">
                名片信息拓展系统 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Frone Xie</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">29</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">10</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">45</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/frone" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://blog.csdn.net/frone" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-CSDN"></i>CSDN</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#会议相关月报样板"><span class="nav-number">1.</span> <span class="nav-text">会议相关月报样板</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#参加会议时间"><span class="nav-number">2.</span> <span class="nav-text">参加会议时间</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#名片角色总会见人数"><span class="nav-number">3.</span> <span class="nav-text">名片角色总会见人数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#关注公司"><span class="nav-number">4.</span> <span class="nav-text">关注公司</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#相关表结构"><span class="nav-number">5.</span> <span class="nav-text">相关表结构</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Frone Xie</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user">本站访客数</i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人数
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye">本站总访问量</i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>





  <script type="text/javascript">
    (function() {
      var hm = document.createElement("script");
      hm.src = "//tajs.qq.com/stats?sId=65946112";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
      <div id="needsharebutton-float">
        <span class="btn">
          <i class="fa fa-share-alt" aria-hidden="true"></i>
        </span>
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("ohqkXUU5txOlX3MjJPCrw7jG-gzGzoHsz", "bPQhLzRSEsTqdIKAGRcHLhyN");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
      pbOptions = {};
      
          pbOptions.iconStyle = "box";
      
          pbOptions.boxForm = "horizontal";
      
          pbOptions.position = "bottomCenter";
      
          pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
      flOptions = {};
      
          flOptions.iconStyle = "box";
      
          flOptions.boxForm = "horizontal";
      
          flOptions.position = "middleRight";
      
          flOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-float', flOptions);
    
  </script>

  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

  <script type="text/javascript" src="/js/src/love.js"></script><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</body>
</html>
